package org.dcits.controller;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.apache.log4j.Logger;
import org.dcits.model.Useracct;
import org.dcits.model.Userinfo;
import org.dcits.service.findUserService;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.SessionAttributes;

import com.alibaba.fastjson.JSONObject;
@Controller
@RequestMapping("user")
@SessionAttributes(names= {"map"})
public class findUserController {

	private static Logger logger = Logger.getLogger(findUserController.class);
	@Resource
	private findUserService finduser;
	
//查询可参考middle-stuSystem项目中hm.cn.controller.AdminController.findSInfo()
	@RequestMapping("info")

	public String findUserInfo(Map<String,Object> map,HttpSession hs){
		int a=(int) hs.getAttribute("userId");
		
		List<Userinfo> user=finduser.findUserInfo(a);
		map.put("map", user);
		List<Useracct> acct=finduser.findUserAcct(a);
		map.put("map2", acct);
		return "userinfo";	
	}		
	}
	
	

